"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x4603B510, 0xD0022A01, 0xD1222A02, 0xBF00E000, 0x68004874, 0x6070F440, 0x60204C72, 0x4C714872,
        0x60203C0C, 0x60204871, 0x1D244871, 0x48716020, 0x486C6020, 0x68001D00, 0x1080F400, 0xF245B940,
        0x4C6D5055, 0x20066020, 0xF6406060, 0x60A070FF, 0xBF00BF00, 0xBD102000, 0x29014601, 0x2902D002,
        0xE000D10F, 0x485FBF00, 0x68003814, 0x0002F040, 0x3A144A5C, 0x46106010, 0xF0406800, 0x60100001,
        0xBF00BF00, 0x47702000, 0x48564601, 0x68003814, 0x7000F440, 0x3A144A53, 0x46106010, 0xF0406800,
        0x60100008, 0x60082000, 0xF64AE003, 0x4A5220AA, 0x484C6010, 0xF0006800, 0x28000001, 0x4849D1F5,
        0x68003814, 0x7000F420, 0x3A144A46, 0x46106010, 0xF0206800, 0x60100008, 0x47702000, 0x20014603,
        0xB5304770, 0x24804603, 0x00FFF101, 0x01FFF020, 0x3814483C, 0xF4406800, 0x4D3A6080, 0x60283D14,
        0x68004628, 0x0008F040, 0xBF006028, 0x6810E005, 0x1D1B6018, 0x1F091D12, 0xB1091F24, 0xD1F62C00,
        0xF64AE003, 0x4D3420AA, 0x482E6028, 0xF0006800, 0x28000001, 0x482BD1F5, 0xF4006800, 0xB1386070,
        0x68004828, 0x6070F440, 0x60284D26, 0xBD302001, 0x38144824, 0xF4206800, 0x4D226080, 0x60283D14,
        0x68004628, 0x0008F020, 0x46286028, 0xF4406800, 0x60286080, 0x68004628, 0x0008F040, 0x24806028,
        0x6810E005, 0x1D1B6018, 0x1F091D12, 0xB1091F24, 0xD1F62C00, 0xF64AE003, 0x4D1720AA, 0x48116028,
        0xF0006800, 0x28000001, 0x480ED1F5, 0xF4006800, 0xB1386070, 0x6800480B, 0x6070F440, 0x60284D09,
        0xE7C42001, 0x38144807, 0xF4206800, 0x4D056080, 0x60283D14, 0x68004628, 0x0008F020, 0x20006028,
        0x0000E7B5, 0x40023C18, 0x89ABCDEF, 0x02030405, 0x8C9DAEBF, 0x13141516, 0x40003000, 0x00000000
    ],

    'pc_Init'            : 0x20000021,
    'pc_UnInit'          : 0x20000079,
    'pc_EraseSector'     : 0x200000A9,
    'pc_ProgramPage'     : 0x20000103,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x12000001F,
    'pc_BlankCheck'      : 0x200000FD,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20000C00,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x000001FC,
    'rw_start'           : 0x000001FC,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x00000200,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x08000000,
    'flash_size'         : 0x00080000,
    'flash_page_size'    : 0x00000100,
}
